<template>
    <div class="row nav boder4">
        <div class="col-md-2 none">
            <p class="bold16"> {{title}}</p>
        </div>
        <div class="col-md-9">
            <div class="row">
                <div class="col-md-12">
                    <div class="navs">
                        <div class="na " v-for="lis in list" v-bind:status="lis.status" v-on:click="sec(lis)"><p>{{lis.text}}</p>  </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>
<script>
    export default {
        props:['ChildByNavToList'],
        name: "my-nav",
        data:function() {
            return  {
                 "title":"专家在线",
                 "list":[
                     {"id":"0","text":"全部","status":"1"},
                     {"id":"1","text":"心电生里","status":"2"},
                     {"id":"2","text":"冠脉血管","status":"2"},
                     {"id":"3","text":"高血压","status":"2"},
                     {"id":"4","text":"心力衰竭","status":"2"}
                 ]
            }
        },
        methods: {
            sec:function(text) {
                alert("1");
                alert(this.ChildByNavToList);
                for (var  i in this.list){
                    if(text.text==this.list[i].text){
                        this.list[i].status="1";

                    }else{
                        this.list[i].status="2";
                    }
                }
            }
        },
        computed: {
            ChildByNavToList: function () {

            }
        }
    }
</script>